﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using AutoMapper;
using Eqwww.Domain.Models.SystemManage;
namespace Eqwww.Web.Areas.SystemManage.Models.Organize
{
    public class OrganizeProfile : Profile
    {
        public OrganizeProfile()
        {
            CreateMap<CreateViewModel, OrganizeModel>();
            CreateMap<OrganizeModel, EditViewModel>()
                .ForMember(d => d.ParentName, opt => opt.MapFrom(s => s.Parent.Name));
            CreateMap<EditViewModel, OrganizeModel>();
        }
    }
}
